﻿using JshRCSWebApi.Infrastructure.Domain.DTO.SysVehicle;
using JshRCSWebApi.Infrastructure.Domain.DTO.SysVehicle.VehicleState;
using JshRCSWebApi.Service.SysVehicle;
using Microsoft.AspNetCore.Mvc;

namespace JshRCSWebApi.API.Controllers.SysVehicle
{
    public class VehicleStateController : BaseController
    {
        private readonly VehicleStateService _vehicleStateService;
        public VehicleStateController(IHttpContextAccessor httpContextAccessor, VehicleStateService vehicleStateService) : base(httpContextAccessor)
        {
            _vehicleStateService = vehicleStateService;
        } 

        /// <summary>
        /// 查询机器人信息 1000     
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_info_req(RequestDTO requestDTO)
            => await _vehicleStateService.robot_status_info_req(requestDTO);

        /// <summary>
        /// 查询机器人运行信息 1002      
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_run_req(RequestDTO requestDTO)
            => await _vehicleStateService.robot_status_run_req(requestDTO);

        /// <summary>
        /// 查询机器人位置 1004       
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_loc_req(RequestDTO requestDTO)
            => await _vehicleStateService.robot_status_loc_req(requestDTO);

        /// <summary>
        /// 查询机器人速度 1005        
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_speed_req(RequestDTO requestDTO)
            => await _vehicleStateService.robot_status_speed_req(requestDTO);

        /// <summary>
        /// 查询机器人的被阻挡状态 1006         
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_block_req(RequestDTO requestDTO)
            => await _vehicleStateService.robot_status_block_req(requestDTO);

        /// <summary>
        /// 查询机器人电池状态 1007          
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_battery_req(RequestDTO<robot_status_battery_DTO> requestDTO)
            => await _vehicleStateService.robot_status_battery_req(requestDTO);

        /// <summary>
        /// 查询机器人扫图状态 1025           
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_slam_req(RequestDTO<robot_status_slam_DTO> requestDTO)
            => await _vehicleStateService.robot_status_slam_req(requestDTO);

        /// <summary>
        /// 查询机器人当前所在区域 1011            
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_area_req(RequestDTO requestDTO)
            => await _vehicleStateService.robot_status_area_req(requestDTO);

        /// <summary>
        /// 查询机器人急停状态 1012             
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_emergency_req(RequestDTO requestDTO)
            => await _vehicleStateService.robot_status_emergency_req(requestDTO);

        /// <summary>
        /// 查询机器人导航状态 1020            
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_task_req(RequestDTO<robot_status_task_DTO> requestDTO)
            => await _vehicleStateService.robot_status_task_req(requestDTO);

        /// <summary>
        /// 查询机器人任务状态 1110             
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_task_status_package_req(RequestDTO<robot_status_task_status_package_DTO> requestDTO)
            => await _vehicleStateService.robot_status_task_status_package_req(requestDTO);

        /// <summary>
        /// 查询机器人定位状态 1021              
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_reloc_req(RequestDTO requestDTO)
            => await _vehicleStateService.robot_status_reloc_req(requestDTO);

        /// <summary>
        /// 查询机器人地图载入状态 1022               
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_loadmap_req(RequestDTO requestDTO)
            => await _vehicleStateService.robot_status_loadmap_req(requestDTO);

        /// <summary>
        /// 查询顶升机构状态 1027                
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_jack_req(RequestDTO requestDTO)
            => await _vehicleStateService.robot_status_jack_req(requestDTO);

        /// <summary>
        /// 查询机器人报警状态 1050                 
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_alarm_req(RequestDTO requestDTO)
            => await _vehicleStateService.robot_status_alarm_req(requestDTO);

        /// <summary>
        /// 查询当前控制权所有者 1060                  
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_current_lock_req(RequestDTO requestDTO)
            => await _vehicleStateService.robot_status_current_lock_req(requestDTO);

        /// <summary>
        /// 查询机器人载入的地图以及储存的地图 1300                   
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_map_req(RequestDTO requestDTO)
            => await _vehicleStateService.robot_status_map_req(requestDTO);

        /// <summary>
        /// 查询机器人当前载入地图中的站点信息 1301                    
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_station_req(RequestDTO requestDTO)
            => await _vehicleStateService.robot_status_station_req(requestDTO);

        /// <summary>
        /// 查询任意两点之间的路径 1303              
        /// </summary>
        /// <param name="requestDTO"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> robot_status_get_path_req(RequestDTO<robot_status_get_path_DTO> requestDTO)
            => await _vehicleStateService.robot_status_get_path_req(requestDTO);



    }
}
